package com.zhuiyun.project.api.complaint.controller;

import com.zhuiyun.project.annotation.OptLog;
import com.zhuiyun.project.api.complaint.model.Complaintmodel;
import com.zhuiyun.project.api.complaint.service.ComplaidFileService;
import com.zhuiyun.project.api.complaint.service.ComplaintService;
import com.zhuiyun.project.common.response.CommonResult;
import com.zhuiyun.project.utils.constants.CommonConstants;
import com.zhuiyun.project.utils.pageUtil.PageRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ComplaidFileController
 * @Description TODO
 * @Author DF
 * @Date 2023/12/18 10:12
 **/
@RestController
@RequestMapping("/complaintFile")
@Api(tags = "投诉管理")
@Slf4j
public class ComplaidFileController {
    @Autowired
    private ComplaidFileService complaidFileService;
    /**
     *
     * @Author jxz
     * @Description 投诉的附件查询
     * @Date 2023/12/13 14:26
     * @Return CommonResult
     * @param id
     **/
    @GetMapping("/selectfile")
    @OptLog(modular = "投诉管理", type = CommonConstants.SELECT, describe = "查询投诉的附件")
    @ApiOperation(value = "投诉的附件查询")
    public CommonResult PageComplaintSelect(Integer id){
        Complaintmodel complaintmodel = new Complaintmodel();
        complaintmodel.setId(id);
        System.out.println("传过来的值：" + complaintmodel);
        return complaidFileService.SelectFile(complaintmodel);
    }
}
